<!DOCTYPE html>
<html>
#{include file="header.html"}#
<div class="demo">
  <div id="uploader">
	<div class="queueList" style="min-height:150px;"> </div>
	<div class="statusBar" style="display:block; border-top: 1px solid #dadada;">
	  <div class="progress"> <span class="text">0%</span> <span class="percentage"></span> </div>
			<div class="divider"></div>
	  <div class="info"></div>
	  <div id="dndArea" class="btns">
		<div id="filePick" style="float:left;">选择图片</div>
		<div class="uploadBtn" onClick="setimg('#{$imgs_id}#');">保存图片</div>
	  </div>
	</div>
  </div>
</div>
<script type="text/javascript" src="#{$smarty.const.APP}#/Extend/webupload/js/webuploader.min.js"></script> 
<script type="text/javascript" src="#{$smarty.const.APP}#/Extend/webupload/js/wupload.js"></script> 
<!--多图上传-->
<link rel="stylesheet" type="text/css" href="#{$smarty.const.APP}#/Extend/webupload/css/webuploader.css">
<link rel="stylesheet" type="text/css" href="#{$smarty.const.APP}#/Extend/webupload/css/webstyle.css">
<style>
	.imgupload{width:100%;padding:5px;}
	.imglist{width: 200px;height: 200px;float: left;}
	.imglist .pic{width: 200px;height: 180px;}
</style>
<script>
function setimg(imgsid){
	var html = '';
	$("input[name^='images']").each(function(i, el) {
		imgpath=$(this).val();
		html += '<li>';
		html += '	<img class="pic" src="'+imgpath+'">';
		html += '	<div class="text">';
		html += '		<div class="imgupload_remove_img" data-url="'+imgpath+'" >删除</div>';
		html += '	</div>';
		html += '	<input type="hidden" name="imglistname[]" value="'+imgpath+'">';
		html += '</li>';		
	});
	parent.$("#"+imgsid).append(html);
	//onClick=imgupload_remove_img(this,"'+imgpath+'");
	//关闭iframe页面
	var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
	parent.layer.close(index);
	// parent.$("#"+imgsid).append('</div>');

}
</script>
